Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing link #121

Merged
merged 10 commits into from
Jun 9, 2024
Merged

Fix missing link #121

merged 10 commits into from
Jun 9, 2024

Conversation

nucleus-ffm
Copy link
Owner

fix #119 and fix #120

@nucleus-ffm nucleus-ffm requested a review from MatsG23 June 5, 2024 17:28
@MatsG23
Copy link
Collaborator

MatsG23 commented Jun 6, 2024

I used the chance to change the return value for an invalid phone number and email address to null. I think this should be a cleaner approach.
Additionally, the extractPhoneNumber has split the contact text but if I understood it correctly we always returned the first element anyways. I adjusted it to match the logic in extractWebAddress more closely

@MatsG23
Copy link
Collaborator

MatsG23 commented Jun 6, 2024

Two further questions:

  • Should we show a toast or print a log if there is no extracted value for the web address/phone number? It may appear like the app is lagging if that special extraction case ever occurs.
  • Can the contact string actually contain multiple phone numbers? How to handle that case?

@nucleus-ffm
Copy link
Owner Author

Additionally, the extractPhoneNumber has split the contact text but if I understood it correctly we always returned the first element anyways. I adjusted it to match the logic in extractWebAddress more closely

We can not do this that way. A common case is e.g. "Bürgertelefon 1234 5678" so we have to filter the "Bürgertelefon in the front to get the telephone number. I had to change that back.

In general, the contact field is in the CAP docu defined as "The text describing the contact for follow-up and confirmation of the alert message (OPTIONAL)". So, there can be anything inside that field. I also saw an alert containing a URL inside the contact field.

@nucleus-ffm nucleus-ffm requested a review from MatsG23 June 6, 2024 19:41
@nucleus-ffm nucleus-ffm merged commit a33acc4 into main Jun 9, 2024
2 checks passed
@nucleus-ffm nucleus-ffm deleted the fixMissingLink branch June 19, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not allow to call a non-existent telephone number Disappearing link in warning
2 participants